Imports Microsoft.VisualBasic

Namespace MyDAO
    Public Class MySubqueryTable
        Inherits MyDataTableBase

        Public builder As SelectStringBuilder

        Public Sub New(ByVal tableName As String)
            Me.builder = New SelectStringBuilder(tableName)
        End Sub

        Public Sub New(ByVal subquery As SelectStringBuilder, ByVal aliasName As String)
            Me.builder = subquery
            Me.AliasName = aliasName
        End Sub

        Public Overrides Function ToString() As String
            Return String.Format("({0}) {1}", builder.Build(), Me.AliasName)
        End Function
    End Class

End Namespace
